package hander

import (
	"github.com/gin-gonic/gin"
	"good/api/reponse"
	"good/api/request"
	"good/internal/dao"
	"good/internal/models"
)

func MessageList(c *gin.Context) {
	req := request.Message{}
	if err := c.ShouldBind(&req); err != nil {
		reponse.ErrorRequest(c, "绑定失败")
		return
	}
	user := models.Message{}
	if err := dao.MessageList(&user); err != nil {
		reponse.ErrorRequest(c, "消息分类展示失败")
		return
	}
	reponse.SuccessRequest(c, "消息分类展示成功", user)
}
